package com.yyk.yiliao.ui.mine.activity;

import android.graphics.Color;
import android.text.SpannableString;
import android.text.Spanned;
import android.text.style.ForegroundColorSpan;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.yyk.yiliao.R;
import com.yyk.yiliao.base.BaseActivity;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * 办理鲁医卡
 */
public class Card_Activity extends BaseActivity {

    @BindView(R.id.mCard_next)
    Button mCardNext;
    @BindView(R.id.mCard_skip)
    TextView mCardSkip;
    private String brealname;
    private String biddcard;


    @Override
    public int getLayoutId() {
        return R.layout.activity_card;
    }

    @Override
    public void initView() {
        initToolbar();
        initTextView();


    }

    private void initTextView() {
        //更改颜色 Android中TextView中部分文字有不同颜色的实现 - 丿灬安之若死 - CSDN博客  https://blog.csdn.net/mp624183768/article/details/78722298
        SpannableString spannableString = new SpannableString("温馨提示：如果您还未开通系统所用鲁医卡，可选择跳过此步骤。跳过");
        spannableString.setSpan(new ForegroundColorSpan(Color.parseColor("#148DFF")), spannableString.length() - 2, spannableString.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
        mCardSkip.setText(spannableString);
    }

    private void initToolbar() {
        setBackArrow();
        setTitle("添加鲁医卡");
    }

    @Override
    public void initData() {
        initGetIntent();

    }


    private void initGetIntent() {
        if (getBundle() != null) {
            biddcard = getBundle().getString("biddcard");
            brealname = getBundle().getString("brealname");
        }
    }


    @OnClick({R.id.mCard_next, R.id.mCard_skip})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.mCard_next:
//                //跳转到 办理卡界面
//                Intent intent = new Intent(Card_Activity.this, CardYi_Activity.class);
//                startActivity(intent);
//                finish();
                break;
            case R.id.mCard_skip:
//                //做最后操作
//                String biddcard = Hawk.get("biddcard");
//                final String brealname = Hawk.get("brealname");
                Identity_Activity.intascne.finish();
                startAct(CardWei_Activity.class, true);


                break;

        }
    }
}
